package com.xdwanj.util;

import java.util.List;

public class PageBean<T> {
    private List<T> content;  //内容列表

    private int size;  //每页大小

    private int elementTotalSize;   //list中元素有多少个

    private int page; //当前页数

    private int totalPage;   //总的页数

    private int totalSize;   //总共的数量

    public PageBean() {
    }

    public PageBean(List<T> content, int size, int elementTotalSize, int page, int totalPage, int totalSize) {
        this.content = content;
        this.size = size;
        this.elementTotalSize = elementTotalSize;
        this.page = page;
        this.totalPage = totalPage;
        this.totalSize = totalSize;
    }

    public List<T> getContent() {
        return content;
    }

    public PageBean<T> setContent(List<T> content) {
        this.content = content;
        return this;
    }

    public int getSize() {
        return size;
    }

    public PageBean<T> setSize(int size) {
        this.size = size;
        return this;
    }

    public int getElementTotalSize() {
        return elementTotalSize;
    }

    public PageBean<T> setElementTotalSize(int elementTotalSize) {
        this.elementTotalSize = elementTotalSize;
        return this;
    }

    public int getPage() {
        return page;
    }

    public PageBean<T> setPage(int page) {
        this.page = page;
        return this;
    }

    public int getTotalPage() {
        return totalPage;
    }

    public PageBean<T> setTotalPage(int totalPage) {
        this.totalPage = totalPage;
        return this;
    }

    public int getTotalSize() {
        return totalSize;
    }

    public PageBean<T> setTotalSize(int totalSize) {
        this.totalSize = totalSize;
        return this;
    }

    @Override
    public String toString() {
        return "PageBean{" +
                "content=" + content +
                ", size=" + size +
                ", elementTotalSize=" + elementTotalSize +
                ", page=" + page +
                ", totalPage=" + totalPage +
                ", totalSize=" + totalSize +
                '}';
    }
}
